<%@page contentType="text/html" pageEncoding="UTF-8" %>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Goodwill - Текущая номенклатура</title>
    <link rel="stylesheet" href="resources/css/main.css"/>
    <link rel="stylesheet" href="resources/css/stylesheet.css"/>    
    <style type="text/css">
       .cell {
           padding:4px 2px;
           text-align:center;
       }

       .tbl {
           border:1px solid black;
       }
    </style>
</head>
<body>
<f:view>
    <h:panelGrid columns="1">
        <h:outputText value="Состояние номенклатуры на #{ImpPrice.timestampAsString}" style="font-size:120%;font-weight:bold;"/>
        <h:outputLink value="javascript:window.print();">
            <h:outputText value="Печать"/>
        </h:outputLink>
    </h:panelGrid>
    <rich:spacer height="20px"/>
    <h:dataTable value="#{ImpPrice.brands}" var="brand" rules="all" columnClasses="cell" styleClass="tbl">
        <h:column>
            <f:facet name="header">
                <h:outputText value="Брэнды"/>
            </f:facet>
            <h:outputText value="#{brand.name}"/>
        </h:column>
    </h:dataTable>
    <rich:spacer height="20px"/>
    <h:dataTable value="#{ImpPrice.clientgroups}" var="clientgroup" rules="all" columnClasses="cell" styleClass="tbl">
        <h:column>
            <f:facet name="header">
                <h:outputText value="Клиентские группы"/>
            </f:facet>
            <h:outputText value="#{clientgroup.brand.name} - #{clientgroup.name}"/>
            <h:outputText value=""/>
        </h:column>
    </h:dataTable>
    <rich:spacer height="20px"/>
    <h:dataTable value="#{ImpPrice.goods}" var="good" rules="all" columnClasses="cell" styleClass="tbl">
        <h:column>
            <f:facet name="header">
                <h:outputText value="Код 1С"/>
            </f:facet>
            <h:outputText value="#{good.c1code}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Код ИС"/>
            </f:facet>
            <h:outputText value="#{good.code}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Наименование"/>
            </f:facet>
            <h:outputText value="#{good.name}"/>
        </h:column>
    </h:dataTable>
</f:view>
</body>
</html>
